package com.bridge.common.consts;

import cn.hutool.core.util.ArrayUtil;

public enum RedisKeyEnum {
    ANALYSIS_LOCK("bridge-dynamc:analysis:%d", "桥梁分析锁，参数:桥梁记录id"),

    ;

    private final String format;
    private final String desc;

    RedisKeyEnum(String format, String desc) {
        this.format = format;
        this.desc = desc;
    }

    public String genKey(Object... args) {
        if (ArrayUtil.isEmpty(args)) {
            return this.format;
        }
        return String.format(this.format, args);
    }



}
